/**************************************************************************
 * @doc FLEET
 * @module FLEET.h |  
 * Include file for the FLEET data file. *
 * Product     :   SoftPay 2000 (Global Payment Methodology).
 * <nl>Developer   :   
 * <nl>Notes       :
 *
 * @head3 FLEET Functions |
 * @index | FLEET
 * @end
 *
 * Copyright (c) 1996-2000 by VeriFone Inc. All rights reserved.
 * 
 * No part of this software may be used, stored, compiled, reproduced,
 * modified, transcribed, translated, transmitted, or transferred, in any form 
 * or by any means whether electronic, mechanical, magnetic, optical, 
 * or otherwise, without the express prior written permission of VeriFone, Inc.
 *
 * Revision History
 * ------------------------------------------------------------------------
 $Log: /SoftPay/SPK2SIM/Source/VitlSrc/nova.h $
 *

*****************************+*********************************************/
#include  "project.h"
#include  <sizes.h>
#include  <print.h>


#ifdef FLEET_DEFINED

#define FLEET_PROD_CODE_SIZE 2
#define FLEET_AMOUNT_SIZE    8
#define FLEET_FUEL_PRICE_SIZE  FLEET_AMOUNT_SIZE 
#define FLEET_GALLONS_SIZE 8
#define FLEET_PIN_SIZE  16



/*
 * The following defines must correspond with IIT.TXT
 */

enum {
	MC_FLEET=9,
	VISA_FLEET,
	BEST,
	GASCARD,
	GO_SYSTEMS,
	PH_AND_H,
	SITE,
	VOYAGER,
	WEX,
	IA
};


typedef struct TagFLEET
{
	char szProductCode[3][FLEET_PROD_CODE_SIZE +1];
	char szDollarAmt[3][ FLEET_AMOUNT_SIZE + 1 ];
	char szFuelPrice[ FLEET_FUEL_PRICE_SIZE + 1 ];
	char szFuelGallons[ FLEET_GALLONS_SIZE + 1 ];
	char chFuelFullServiceIndicator;
	
} FLEET_REC;

#define SIZE_FLEET_REC  sizeof(FLEET_REC)

extern FLEET_REC srFleetRec;

int inGetDriverId( TRANSACTION_OBJECT *pobTran );
int inGetOdometer( TRANSACTION_OBJECT *pobTran );
int inGetVehicleNumber( TRANSACTION_OBJECT *pobTran );
int inGetFleetPIN( TRANSACTION_OBJECT *pobTran );
int inGetPetroleumFields( TRANSACTION_OBJECT *pobTran );
int inValidateFleetCard( TRANSACTION_OBJECT *pobTran );
int inProductPriceReport( TRANSACTION_OBJECT *pobTran );
int inEditPDTOperation( TRANSACTION_OBJECT *pobTran );
int inSelectProductCode(char *szProductCode);
int inGetFullServiceIndicator(void);
int inGetGallonsPumped (char *szAmount, long lnMin, long lnMax );
int inGetQuantity(void);
int inFleetSetReceiptFields( TRANSACTION_OBJECT *pobTran );
int inFleetSetReceiptMiddleConditions( TRANSACTION_OBJECT *pobTran );
int inFleetSetReceiptBottomConditions (TRANSACTION_OBJECT *pobTran);
int inFleetSetReceiptBottomFields( TRANSACTION_OBJECT *pobTran );
int inGetFleetBaseAmount( TRANSACTION_OBJECT *pobTran );

void vdSetFleetFlag(char chFlag);
VS_BOOL fGetFleetFlag( char chFlag );
int inAddFleetFunctions(void);
int inPrintProductReportOperation(TRANSACTION_OBJECT *pobTran );
void vdSetFleetHeaderCondition (void);
int inGetVoyagerRestrictionCode( char *szCode );
int inValidatePRCString (char *szString);
int inGetGORestrictionCode( void );
int inGetFleetTemplate(void);
void vdGetFleetPIN( char *szPIN );
VS_BOOL fGetFleetPIN(void);
VS_BOOL fFuelCode(char *szCode);

void	vdSetFleetFields( BATCH_REC * psrBRec );

void 	vdGetFleetReceiptStruct( BATCH_REC *psrBRec, unsigned char *szData );
void 	vdSetFleetReceiptStruct( BATCH_REC *psrBRec, unsigned char *szData );

#endif
